﻿<%@ Page Language="C#" MasterPageFile="~/Content/themes/Standard/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BlogEngine.Core.IPublishable>>" %>
<%@ Import Namespace="BlogEngine.Core" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
<%=BlogSettings.Instance.Name %>
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<% foreach ( Post post in ViewData.Model ) { %>
<div class="post xfolkentry" id="post<%= post.Author %>">
  <h1><a href="<%= post.RelativeLink %>" class="taggedlink"><%=Server.HtmlEncode(post.Title) %></a></h1>
  <span class="author">by <a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + Server.UrlEncode(post.Author) %>.aspx"><%=post.AuthorProfile != null ? post.AuthorProfile.DisplayName : post.Author %></a></span>
  <span class="pubDate"><%=post.DateCreated.ToString("d. MMMM yyyy HH:mm") %></span>
  
  <div class="text"><asp:PlaceHolder ID="BodyContent" runat="server" /></div>
  <div class="bottom">
  <div class="text"><%= post.Content %></div>
    <%--<%= post.Rating %>--%>
    <p class="tags">Tags: [Fix This!]<%--<%= BlogEngine.Core.Web.MVCHelpers.TagLinks.TagLinksString( ", " )%>--%></p>
    <p class="categories">[Fix This!]<%--<%= post.Categories %>--%></p>
  </div>

  <div class="footer">    
    <div class="bookmarks">
      <a rel="nofollow" title="Index <%= post.Author %>" target="_blank" href="http://www.dotnetkicks.com/submit?url=<%=Server.UrlEncode(post.AbsoluteLink.ToString()) %>&amp;title=<%=Server.UrlEncode(post.Title) %>">Submit to DotNetKicks...</a>
    </div>
    
    <a rel="bookmark" href="<%=post.PermaLink %>" title="<%=Server.HtmlEncode(post.Title) %>">Permalink</a> |
    <a rel="nofollow" href="<%=post.RelativeLink %>#comment"><%=Resources.labels.comments %> (<%=post.ApprovedComments.Count %>)</a>
  </div>
</div>
    
<% } %>
</asp:Content>
